﻿using System.Windows.Controls;
using MMK.Paket_Tracker.Runtime.Interfaces;
using MMK.Paket_Tracker.GUI.ViewModels;
using System.Collections.Generic;
using System;

namespace MMK.Paket_Tracker.GUI.Views
{
    /// <summary>
    /// Interaction logic for CheckData.xaml
    /// </summary>
    public partial class CheckData : UserControl, INamedUserControl
    {
        /// <summary>
        /// Initializes a new instance of the <see cref="CheckData"/> class.
        /// </summary>
        public CheckData()
        {
            InitializeComponent();
            viewModel = new CheckDataViewModel(this);
            DataContext = viewModel.Data;

            this.EmpfHausnummer.EntryBox.IsEnabled = false;
            this.EmpfNachname.EntryBox.IsEnabled = false;
            this.EmpfOrt.EntryBox.IsEnabled = false;
            this.EmpfPLZ.EntryBox.IsEnabled = false;
            this.EmpfStrasse.EntryBox.IsEnabled = false;
            this.EmpfVorname.EntryBox.IsEnabled = false;

            this.SenderHausnummer.EntryBox.IsEnabled = false;
            this.SenderNachname.EntryBox.IsEnabled = false;
            this.SenderOrt.EntryBox.IsEnabled = false;
            this.SenderPLZ.EntryBox.IsEnabled = false;
            this.SenderStrasse.EntryBox.IsEnabled = false;
            this.SenderVorname.EntryBox.IsEnabled = false;
            
        }

        /// <summary>
        /// Gets the name or title of the view.
        /// </summary>
        /// <value>The name of the view.</value>
        public string ViewName
        {
            get { return "Daten bitte nochmals überprüfen"; }
        }

        /// <summary>
        /// Sets the error info.
        /// </summary>
        /// <value>
        /// The error info.
        /// </value>
        public Dictionary<String, String> ErrorInfo
        {
            set { this.ForwardButton.ToolTip = value.ToString(); }
        }


        private CheckDataViewModel viewModel;
    }
}
